#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>
#include <QComboBox>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QPushButton* button = new QPushButton(this);
    button->setGeometry(0,0,300,200);
    button->setText("按钮");

    button->setStyleSheet("QPushButton {color : red;} QPushButton:hover {color : green;}");

    QComboBox* box = new QComboBox(this);
    box->addItem("1");
    box->addItem("2");
    box->addItem("3");
    box->setGeometry(400,400,200,50);
    box->setStyleSheet("QComboBox::down-arrow {image : url(:/blue.jpg)}");
}

Widget::~Widget()
{
    delete ui;
}

